package com.ruoyi.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "wxpay") // 对应yml中的"wxpay"前缀
public class WxPayConfig {
    private String mchId;         // 商户号
    private String mchKey;        // 商户密钥
    private String unifiedorderUrl; // 统一下单接口地址
    private String notifyUrl;     // 支付回调地址
    private String signType;      // 签名类型（如MD5）

    // Getter和Setter（若依框架支持Lombok，可简化为@Data）
    public String getMchId() { return mchId; }
    public void setMchId(String mchId) { this.mchId = mchId; }
    public String getMchKey() { return mchKey; }
    public void setMchKey(String mchKey) { this.mchKey = mchKey; }
    public String getUnifiedorderUrl() { return unifiedorderUrl; }
    public void setUnifiedorderUrl(String unifiedorderUrl) { this.unifiedorderUrl = unifiedorderUrl; }
    public String getNotifyUrl() { return notifyUrl; }
    public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; }
    public String getSignType() { return signType; }
    public void setSignType(String signType) { this.signType = signType; }
}
